package com.zxjia.ssmp.exception;


import com.zxjia.ssmp.vo.Result;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestControllerAdvice;


@RestControllerAdvice
public class ExceptionHandle {

    @ExceptionHandler(value = BusinessException.class)
    @ResponseBody
    public Result handleServiceException(BusinessException e) {
        return Result.systemError(e.getMessage());
    }



}
